package mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import pojo.User;
import pojo.UserInfo;

import java.util.List;

public interface UserMapper {
    @Select("select  * from user_info")
    List<UserInfo> selectAll();

    @Select("select * from user where username= #{username} and password = #{password} ;")
    User selectOne(@Param("username") String username,@Param("password") String password);

    @Update("UPDATE user_info SET status = #{status} WHERE id = #{id}")
    void updateStatus(@Param("id") Integer id, @Param("status") String status);

    @Select("select * from user_info where name= #{name};")
    UserInfo selectUserInfo(@Param("name") String name);



}
